<template>
	<view>
		<view class="log-item" v-for="(item, index) in logList" :key="index">
			<view class="log-item-top"><rich-text :nodes="item.title" class="title"></rich-text></view>
			<view class="log-item-bottom">
				<rich-text :nodes="item.dateTime" class="leftText"></rich-text>
				<rich-text :nodes="item.describe" class="rightText"></rich-text>
			</view>
		</view>
	</view>
</template>

<script>
import parseHtml from '@/util/html-parser.js';
export default {
	props: {
		logList: {
			type: Array,
			default() {
				return [];
			}
		}
	},
	created() {
		this.logList.forEach(item => {
			item.title = parseHtml(item.title);
			item.leftText = parseHtml(item.leftText);
			item.rightText = parseHtml(item.rightText);
		});
	}
};
</script>

<style lang="scss" scoped>
.log-item {
	width: 95%;
	margin: 0 auto;
	padding: 5rpx 0;
	border-bottom: 1px solid #dddddd;
	.log-item-bottom {
		display: flex;
		justify-content: space-between;
		.leftText {
			font-size: 26rpx;
		}
		.rightText {
			font-size: 30rpx;
		}
	}
	.log-item-top {
		padding: 5rpx 0;
		.title {
			font-size: 30rpx;
		}
	}
}
</style>
